package com.tank.bean;

import java.util.Date;
import java.util.UUID;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.GenericGenerator;

@Entity
public class MailValid {
	
	
	public static String VALID_REG="REGISTER";//注册时邮箱验证
	public static String VALID_FIND="FINDPASS";//密码重设验证
	
	
	@GenericGenerator(name = "gen", strategy = "increment")
	@Id
	@GeneratedValue(generator = "gen")
	private Integer id;//标识
	
	@Temporal(TemporalType.TIMESTAMP)
	private Date pubtime;
	@ManyToOne
	private User author;
	
	@Column(length=30)
	private String action;
	
	@Column(length=50)
	private String uuid;
	
	private Boolean valid;
	
	public MailValid() {
	}
	
	
	public MailValid(User author) {
		this.author=author;
		//this.action=this.VALID_REG;
	}
	
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Date getPubtime() {
		return pubtime;
	}

	public void setPubtime(Date pubtime) {
		this.pubtime = pubtime;
	}

	public User getAuthor() {
		return author;
	}

	public void setAuthor(User author) {
		this.author = author;
	}

	public String getAction() {
		return action;
	}

	public void setAction(String action) {
		this.action = action;
	}

	public String getUuid() {
		return uuid;
	}

	public void setUuid(String uuid) {
		this.uuid = uuid;
	}

	public Boolean getValid() {
		return valid;
	}

	public void setValid(Boolean valid) {
		this.valid = valid;
	}
	
	
	
	
	

}
